
package elephant.config;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import elephant.Container;
import elephant.Server;
import elephant.service.Service;

/**
 * 
 * @author icecooly
 *
 */
public class ConfigContextImpl implements ConfigContext{
	private static Logger logger=LoggerFactory.getLogger(ConfigContextImpl.class);
	//
	/**
	 * @param container Container
	 */
	public ConfigContextImpl() {
	}

	@Override
	public void logDebug(String msg) {
		logger.debug(msg);
	}

	
	@Override
	public void logError(String msg) {
		logger.error(msg);
	}

	
	@Override
	public void logTrace(String msg) {
		logger.trace(msg);
	}


	@Override
	public void logInfo(String msg) {
		logger.info(msg);
	}

	
	@Override
	public void logWarn(String msg) {
		logger.warn(msg);
	}
	//
	
	@Override
	public void registerService(Service service) {
		Container.get().registerService(service);
	}
	//
	@Override
	public String getServerName() {
		return Container.get().getServerName();
	}
	//
	@Override
	public String getServerPath() {
		return Container.get().getServerPath();
	}
	//
	@Override
	public void registerServer(Server server) {
		Container.get().registerServer(server);
	}

	@Override
	public void loadApplication(String appArchiveFile) throws Exception {
		Container.get().loadApplication(appArchiveFile);
	}
}
